﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:highliter="clr-namespace:System.Controls.Highliter">

  <ControlTemplate x:Key="ro_sqltextviewer_control_template" TargetType="highliter:SqlTextViewer">
    
    <Grid>
      <Border
        x:Name="border"
        BorderThickness="{TemplateBinding BorderThickness}"
        BorderBrush="{TemplateBinding BorderBrush}"
        Background="{TemplateBinding Background}">

        <FlowDocumentReader
          IsTwoPageViewEnabled="False"
          IsPageViewEnabled="False"
          IsScrollViewEnabled="True"
          IsPrintEnabled="True"
          IsFindEnabled="True"
          ViewingMode="Scroll"
          ScrollViewer.HorizontalScrollBarVisibility="Auto" 
          ScrollViewer.VerticalScrollBarVisibility="Auto" 
          ScrollViewer.CanContentScroll="True"
          Background="{TemplateBinding Background}"
          Foreground="{TemplateBinding Foreground}"
          FontFamily="{TemplateBinding FontFamily}"
          FontSize="{TemplateBinding FontSize}"
          FontWeight="{TemplateBinding FontWeight}"
          FontStyle="{TemplateBinding FontStyle}">
          
          <FlowDocument x:Name="PART_flow_document" PageWidth="2048"/>
          
        </FlowDocumentReader>
        
      </Border>

    </Grid>    
  </ControlTemplate>


  <Style TargetType="highliter:SqlTextViewer">
    <Setter Property="Template" Value="{StaticResource ro_sqltextviewer_control_template}"/>
  </Style>

</ResourceDictionary>